﻿using System;

namespace ConsoleUtility.Command
{
    /// <summary>
    /// 命令特性
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public class CommandAttribute : Attribute
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 默认方法
        /// </summary>
        public string DefaultMehtod { get; set; }

        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="name">名称</param>
        /// <param name="defaultMethod">默认方法</param>
        public CommandAttribute(string name, string defaultMethod)
        {
            Name = name;
            DefaultMehtod = defaultMethod;
        }
    }
}
